//
//  Extension+UILable.swift
//  weibo
//
//  Created by apple on 15/12/18.
//  Copyright © 2015年 LYR. All rights reserved.
//

import UIKit

extension UILabel {

    convenience init(title: String,color: UIColor,fontSize: CGFloat,margin: CGFloat = 0) {
    
        self.init()
        text = title
        
        textColor = color
        
        textAlignment = .Center
        
        font = UIFont.systemFontOfSize(fontSize)
        
        numberOfLines = 0
        
        if margin > 0 {
        
            preferredMaxLayoutWidth = screenW - 2 * StatusCellMargin
            textAlignment = .Left
        }
        
        sizeToFit()


    }

}